package cn.zh.config;

import cn.zh.log.MyLogInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 我的日志自动配置
 *
 * @author 白羊
 * @date 2021/12/23
 */
@Configuration
public class MyLogAutoConfiguration implements WebMvcConfigurer {

    //注册自定义日志拦截器
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new MyLogInterceptor());
    }

}
